home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / rayfiles / rsdefs / examples / checkers.ray next >
Text File  |  1994-08-09  |  4KB  |  166 lines

  1. /************************************************************************
  2.  *
  3.  *      checkers.ray
  4.  *
  5.  *      This is an example file for the rsdefs package.
  6.  *
  7.  *      Please do not edit this file, or any of the other files in
  8.  *      this package!  Make additions to these in your own separate
  9.  *      file.  If you think you have something that should be added
  10.  *      permanently, please send it to Larry Coffin and/or David
  11.  *      DeBry (email addresses listed below).  If we include it in
  12.  *      the next release, we'll put your name in the contributor's
  13.  *      list.
  14.  *
  15.  *      Contributors (in alphabetical order):
  16.  *          Larry Coffin <lcoffin@clciris.chem.umr.edu>
  17.  *          David DeBry <ddebry@dsd.es.com>
  18.  *
  19.  */
  20.  
  21. #include "defs.rh"
  22.  
  23. RSMdaysky()
  24. RSFtv_alpha()
  25. RSF4x3screen(1)
  26.  
  27. eyep -1 -40 40
  28.  
  29. maxdepth 5
  30.  
  31. light 1 1 1 extended 1  50 -50 50
  32.  
  33. /*********************************************************************
  34.  *
  35.  *    Constants.  BOARDSIZE is the size of the side of the board and
  36.  * is the same for both the chessboard and the RSMchesspiece macro.
  37.  */
  38.  
  39. #define BOARDSIZE 7
  40. #define RAD ((1/16 * .75) * BOARDSIZE)
  41.  
  42. /********************************************************************
  43.  *
  44.  *    The chess (checker!) board.
  45.  */
  46.  
  47. RSPcylinder_board(,RSSsilver(),RSSgold(),BOARDSIZE)
  48.  
  49. /***********************************************************************
  50.  *
  51.  *    One checker.
  52.  */
  53.  
  54. RSProundeddisc(name check, RAD, 0,0,.0375, 0,0,1, .075)
  55.  
  56. /***********************************************************************
  57.  *
  58.  *    Checker surfaces
  59.  */
  60.  
  61. surface black_plastic
  62.     ambient .01 .01 .01
  63.     diffuse .02 .02 .02
  64.     specular 1 1 1
  65.     specpow 50
  66.     reflect .1
  67.  
  68. surface red_plastic
  69.     ambient .4 .00 .00
  70.     diffuse .8 .00 .00
  71.     specular 1 1 1
  72.     specpow 50
  73.     reflect .1
  74.  
  75. #define team1 black_plastic
  76. #define team2 red_plastic
  77.  
  78.  
  79. /***********************************************************************
  80.  *
  81.  *    Team 1.
  82.  */
  83.  
  84. object team1 check
  85. RSMchesspiece(1,1,BOARDSIZE)
  86. object team1 check
  87. RSMchesspiece(1,2,BOARDSIZE)
  88. object team1 check
  89. RSMchesspiece(1,3,BOARDSIZE)
  90. object team1 check
  91. RSMchesspiece(1,4,BOARDSIZE)
  92. object team1 check
  93. RSMchesspiece(1,5,BOARDSIZE)
  94. object team1 check
  95. RSMchesspiece(1,6,BOARDSIZE)
  96. object team1 check
  97. RSMchesspiece(1.5,7,BOARDSIZE)    /* this one is in the process of moving */
  98. object team1 check
  99. RSMchesspiece(1,8,BOARDSIZE)
  100.  
  101. object team1 check
  102. RSMchesspiece(2,1,BOARDSIZE)
  103. object team1 check
  104. RSMchesspiece(2,2,BOARDSIZE)
  105. object team1 check
  106. RSMchesspiece(3,3,BOARDSIZE)
  107. object team1 check
  108. RSMchesspiece(2,4,BOARDSIZE)
  109. object team1 check
  110. RSMchesspiece(4,5,BOARDSIZE)
  111. object team1 check
  112. RSMchesspiece(2,6,BOARDSIZE)
  113. object team1 check
  114. RSMchesspiece(3,7,BOARDSIZE)
  115. object team1 check
  116. RSMchesspiece(2,8,BOARDSIZE)
  117.  
  118. /***********************************************************************
  119.  *
  120.  *    Team 2
  121.  */
  122.  
  123. object team2 check
  124. RSMchesspiece(8,1,BOARDSIZE)
  125. object team2 check
  126. RSMchesspiece(8,2,BOARDSIZE)
  127. object team2 check
  128. RSMchesspiece(8,3,BOARDSIZE)
  129. object team2 check
  130. RSMchesspiece(8,4,BOARDSIZE)
  131. object team2 check
  132. RSMchesspiece(8,5,BOARDSIZE)
  133. object team2 check
  134. RSMchesspiece(8,6,BOARDSIZE)
  135. object team2 check
  136. RSMchesspiece(8,7,BOARDSIZE)
  137. object team2 check
  138. RSMchesspiece(8,8,BOARDSIZE)
  139.  
  140. object team2 check
  141. RSMchesspiece(7,1,BOARDSIZE)
  142. object team2 check
  143. RSMchesspiece(7,2,BOARDSIZE)
  144. object team2 check
  145. RSMchesspiece(6,3,BOARDSIZE)
  146. object team2 check
  147. RSMchesspiece(5,4,BOARDSIZE)
  148. object team2 check
  149. RSMchesspiece(7,5,BOARDSIZE)
  150. object team2 check
  151. RSMchesspiece(7,6,BOARDSIZE)
  152. object team2 check
  153. RSMchesspiece(5,7,BOARDSIZE)
  154. object team2 check
  155. RSMchesspiece(7,8,BOARDSIZE)
  156.  
  157. /***********************************************************************
  158.  *
  159.  *    The floor.
  160.  */
  161.  
  162. name floor plane 0 0 -1.001  0 0 1
  163.  
  164. RSTnamed_marb_check1(floor, 3)
  165.  
  166.